# -*- coding: UTF-8 -*-
from server.model import Base
from sqlalchemy.sql.functions import now
from sqlalchemy import Column, Integer, String, DateTime, Boolean, BigInteger


class SysOperationRecords(Base):
    __tablename__ = 'sys_operation_records'
    id = Column(BigInteger, primary_key=True, nullable=False, doc='')
    ip = Column(String(191), doc='请求ip')
    method = Column(String(191), doc='请求方法')
    path = Column(String(191), doc='请求路径')
    agent = Column(String(191), doc='代理')
    error_message = Column(String(191), doc='错误信息')
    created_at = Column(DateTime, default=now(), doc='')
    updated_at = Column(DateTime, default=now(), doc='')
    deleted_at = Column(DateTime, index=True, doc='')
    deleted = Column(Boolean, default=0, doc='')
